#include<iostream>
using namespace std;
const int N = 1e5 + 10;
int arr[N];
int s[N];
int main()
{
	int n;
	cin >> n;
	for (int i = 1; i <= n; i++) {
		cin >> arr[i];
		s[i] = s[i - 1] + arr[i];
	}
	cout << n << endl;
	for (int i = 1; i <= n; i++) {
		cout << s[i] << endl;
	}
	return 0;
}